<?php
function bxy_search_array_value($arr,$key,$field,$search_value){
	$temp_arr = [];
	foreach ($arr as $value) {
		if ($value[$key]===$search_value) {
			$temp_arr[] = $value[$field];
		}
	}
	return $temp_arr;
}
function bxy_array_by_group($array,$key){
	$group = [];
	if($array){
		foreach ($array as $item) {
			$group[$item[$key]][] = $item;
		}
	}
	return $group;
}
function bxy_get_content_img($content)
{
	$pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg]))[\'|\"].*?[\/]?>/";
	preg_match_all($pattern,$content,$match);
	if(!empty($match[1])){
		return $match[1][0];
	}
	return false;
}